for /f %%a in ('cd') do set GRAILS_HOME=%%a\grails-1.0.3-SNAPSHOT
set PATH=%JAVA_HOME%\bin;%GRAILS_HOME%\bin;%PATH%
7za x grails-bin-1.0.3-SNAPSHOT.zip
call grails create-app temp
cd temp
call grails war
copy temp-0.1.war ..
cd ..
7za x temp-0.1.war -otemp-0.1
7za x apache-tomcat-6.0.16.zip
move apache-tomcat-6.0.16 gyrocat-6.0.16-g103-SNAPSHOT
copy temp-0.1\WEB-INF\lib\*.jar gyrocat-6.0.16-g103-SNAPSHOT\lib
rmdir /s /q grails-1.0.3-SNAPSHOT
rmdir /s /q temp
rmdir /s /q temp-0.1
del /q temp-0.1.war
7za a -r gyrocat-6.0.16-g103-SNAPSHOT.zip gyrocat-6.0.16-g103-SNAPSHOT\*.*
rmdir /s /q gyrocat-6.0.16-g103-SNAPSHOT

